<template>
	<view class="">
		<view class="u-p-30 bg-white" @click="toAddress">
			<view class="flex align-center justify-between" v-if="address">
				<view class="flex flex-column">
					<view class="flex align-center">
						<u-tag class="u-m-r-10" v-if="address.isdefault" text="默认" size="mini" bgColor="var(--mainColor)" borderColor="var(--mainColor)" color="#fff"></u-tag>
						<text>{{ address.Area&&address.Area.join("") }}</text>
					</view>
					<text class="u-p-y-20">{{ address.detail }}</text>
					<view class="flex align-center ">
						<text>{{address.name}}</text>
						<text class="u-m-l-20 u-m-r-40">{{address.phone}}</text>
					</view>
				</view>
				<u-icon name="arrow-right" size="30"></u-icon>
			</view>
			<view class="" style="text-align:center;" v-else>
				<dy-button size="medium" @click="toAddress">添加地址</dy-button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "supplier-order-address",
		props: {
			address: {
				type: Object,
				default() {
					return {}
				}
			}
		},
		data() {
			return {
				
			}
		},
		methods: {
			toAddress() {
				uni.navigateTo({
					url: '/pages/mine/settingInfo/settingAddress/settingAddress?from=orderAdd'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
</style>
